Tracking and gesture recognition system particularly suited to vehicular control applications

ABSTRACT

A system and method tracks the movements of a driver or passenger in a vehicle (ground, water, air, or other) and controls devices in accordance with position, motion, and/or body or hand gestures or movements. According to one embodiment, an operator or passenger uses the invention to control comfort or entertainment features such the heater, air conditioner, lights, mirror positions or the radio/CD player using hand gestures. An alternative embodiment facilitates the automatic adjustment of car seating restraints based on head position. Yet another embodiment is used to determine when to fire an airbag (and at what velocity or orientation) based on the position of a person in a vehicle seat. The invention may also be used to control systems outside of the vehicle. The on-board sensor system would be used to track the driver or passenger, but when the algorithms produce a command for a desired response, that response (or just position and gesture information) could be transmitted via various methods (wireless, light, whatever) to other systems outside the vehicle to control devices located outside the vehicle. For example, this would allow a person to use gestures inside the car to interact with a kiosk located outside of the car.

REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/004,058, filed Nov. 1, 2001, now U.S. Pat. No. 7,050,606, which is acontinuation-in-part of U.S. patent application Ser. No. 09/798,594,filed Mar. 2, 2001, which is a continuation-in-part of U.S. patentapplication Ser. No. 09/371,460, filed Aug. 10, 1999, the entirecontents of each application being incorporated herein by reference.

FIELD OF THE INVENTION

This invention resides in a system for tracking a driver or passenger ina vehicle and, in particular, to controlling operational devices orcomfort features in the vehicle based on position, motion, and/or bodyor hand gestures.

BACKGROUND OF THE INVENTION

Gesture recognition has many advantages over other input means, such asthe keyboard, mouse, speech recognition, and touch screen. The keyboardis a very open ended input device and assumes that the user has at leasta basic typing proficiency. The keyboard and mouse both contain movingparts. Therefore, extended use will lead to decreased performance as thedevice wears down. The keyboard, mouse, and touch screen all need directphysical contact between the user and the input device, which couldcause the system performance to degrade as these contacts are exposed tothe environment. Furthermore, there is the potential for abuse anddamage from vandalism to any tactile interface which is exposed to thepublic.

Tactile interfaces can also lead hygiene problems, in that the systemmay become unsanitary or unattractive to users, or performance maysuffer. These effects would greatly diminish the usefulness of systemsdesigned to target a wide range of users, such as advertising kiosksopen to the general public. This cleanliness issue is very important forthe touch screen, where the input device and the display are the samedevice. Therefore, when the input device is soiled, the effectiveness ofthe input and display decreases. Speech recognition is very limited in anoisy environment, such as sports arenas, convention halls, or even citystreets. Speech recognition is also of limited use in situations wheresilence is crucial, such as certain military missions or library cardcatalog rooms.

Gesture recognition systems do not suffer from the problems listedabove. There are no moving parts, so device wear is not an issue.Cameras, used to detect features for gesture recognition, can easily bebuilt to withstand the elements and stress, and can also be made verysmall and used in a wider variety of locations. In a gesture system,there is no direct contact between the user and the device, so there isno hygiene problem. The gesture system requires no sound to be made ordetected, so background noise level is not a factor. A gesturerecognition system can control a number of devices through theimplementation of a set of intuitive gestures. The gestures recognizedby the system would be designed to be those that seem natural to users,thereby decreasing the learning time required. The system can alsoprovide users with symbol pictures of useful gestures similar to thosenormally used in American Sign Language books. Simple tests can then beused to determine what gestures are truly intuitive for any givenapplication.

For certain types of devices, gesture inputs are the more practical andintuitive choice. For example, when controlling a mobile robot, basiccommands such as “come here”, “go there”, “increase speed”, “decreasespeed” would be most efficiently expressed in the form of gestures.Certain environments gain a practical benefit from using gestures. Forexample, certain military operations have situations where keyboardswould be awkward to carry, or where silence is essential to missionsuccess. In such situations, gestures might be the most effective andsafe form of input.

SUMMARY OF THE INVENTION

This invention resides in a system for tracking a driver or passenger ina vehicle (ground, water, air, or other) and for controlling devices inthat vehicle based on position, motion, and/or body/hand gestures.Broadly, the system tracks a person in the vehicle and uses theirposition and/or motions to control devices in the vehicle, or to havecertain systems (such as safety or comfort systems) respond and adjustautomatically.

According to one embodiment, an operator or passenger uses the inventionto control comfort or entertainment features such the heater, airconditioner, lights, mirror positions or the radio/CD player using handgestures. An alternative embodiment facilitates the automatic adjustmentof car seating restraints based on head position. Yet another embodimentis used to determine when to fire an airbag (and at what velocity ororientation) based on the position of a person in a vehicle seat.

The invention may also be used to control systems outside of thevehicle. The on-board sensor system would be used to track the driver orpassenger, but when the algorithms produce a command for a desiredresponse, that response (or just position and gesture information) couldbe transmitted via various methods (wireless, light, whatever) to othersystems outside the vehicle to control devices located outside thevehicle. For example, this would allow a person to use gestures insidethe car to interact with a kiosk located outside of the car.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified drawing of an imaging system and computer withtracking algorithm according to the invention;

FIG. 2 is a flow chart illustrating important steps of the trackingalgorithm;

FIG. 3 is a drawing of a preferred graphical user interface for use withthe system of the invention;

FIG. 4 is a series of drawings which show the use of color to track atarget or feature;

FIG. 5 illustrates the use a truncated cone to account for slightvariations in color;

FIG. 6 illustrates steps of a method according to the invention writtenin pseudocode; and

FIG. 7 is a simplified diagram illustrating the applicability of gesturecontrol to vehicular applications.

DETAILED DESCRIPTION OF THE INVENTION

This invention resides in a system and method for tracking a driver orpassenger in a vehicle, and controlling operational devices, comfort orsafety features in the vehicle based on position, motion, and/or body orhand gestures or movements. The invention is not limited in terms ofvehicle type, and is applicable to ground, water, air and spaceapplications.

Broadly, the system tracks a person in the vehicle, and uses theirposition and/or motions to control devices in the vehicle, or to havecertain systems (such as safety or comfort systems) respond and adjustautomatically. In the preferred embodiment, an interactive vehicularcontrol system according to the invention would include the followingcomponents:

-   -   1. One or more cameras (or other sensing system) to view the        driver or passenger;    -   2. A tracking system for tracking the position, velocity or        acceleration of person's head, body, or other body parts;    -   3. A gesture/behavior recognition system for recognizing and        identifying the person's motions; and    -   4. Algorithms for controlling devices in the vehicle, whether        under active or passive control by the vehicle occupant.

Apart from the specific applicability to vehicular applicationsdisclosed herein, the components listed above are disclosed anddescribed in detail in U.S. patent application Ser. Nos. 09/371,460 and09/798,594, the entire contents of which have been incorporated hereinby reference.

The system described in U.S. patent application Ser. No. 09/371,460 notonly recognizes static symbols, but dynamic gestures as well, sincemotion gestures are typically able to convey more information. In termsof apparatus, the system is preferably modular, and includes a gesturegenerator, sensing system, modules for identification and transformationinto a command, and a device response unit. At a high level, the flow ofthe system is as follows. Within the field of view of one or morestandard video cameras, a gesture is made by a person or device. Duringthe gesture making process, a video image is captured, producing imagedata along with timing information. As the image data is produced, afeature-tracking algorithm is implemented which outputs position andtime information. This position information is processed by static anddynamic gesture recognition algorithms. When the gesture is recognized,a command message corresponding to that gesture type is sent to thedevice to be controlled, which then performs the appropriate response.

The system preferably searches for static gestures only when the motionis very slow (i.e. the norm of the x and y -- and z -- velocities isbelow a threshold amount). When this occurs, the system continuallyidentifies a static gesture or outputs that no gesture was found. Staticgestures are represented as geometric templates for commonly usedcommands such as ON/OFF, Left/Right Turn, and so forth. Languagegestures, such as the American Sign Language, can also be recognized.

A file of recognized gestures, which lists named gestures along withtheir vector descriptions, is loaded in the initialization of thesystem. Static gesture recognition is then performed by identifying eachnew description. A simple nearest neighbor metric is preferably used tochoose an identification. In recognizing static hand gestures, the imageof the hand is preferably localized from the rest of the image to permitidentification and classification. The edges of the image are preferablyfound with a Sobel operator. A box which tightly encloses the hand isalso located to assist in the identification.

Dynamic (circular and skew) gestures are preferably treated asone-dimensional oscillatory motions. Recognition of higher-dimensionalmotions is achieved by independently recognizing multiple,simultaneously created one-dimensional motions. A circle, for example,is created by combining repeating motions in two dimensions that havethe same magnitude and frequency of oscillation, but wherein theindividual motions ninety degrees out of phase. A diagonal line isanother example. Distinct circular gestures are defined in terms oftheir frequency rate; that is, slow, medium, and fast.

Additional dynamic gestures are derived by varying phase relationships.During the analysis of a particular gesture, the x and y minimum andmaximum image plane positions are computed. Z position is computed ifthe system is set up for three dimensions. If the x and y motions areout of phase, as in a circle, then when x or y is minimum or maximum,the velocity along the other is large. The direction (clockwiseness intwo dimensions) of the motion is determined by looking at the sign ofthis velocity component. Similarly, if the x and y motion are in phase,then at these extremum points both velocities are small. Using clockwiseand counter-clockwise circles, diagonal lines, one-dimensional lines,and small and large circles and lines, a large gesture lexicon libraryis developed. A similar method is used when the gesture is performed inthree dimensions.

An important aspect of the technique is the use of parameterization andpredictor bins to determine a gesture's future position and velocitybased upon its current state. The bin predictions are compared to thenext position and velocity of each gesture, and the difference betweenthe bin's prediction and the next gesture state is defined as theresidual error. A bin predicting the future state of a gesture itrepresents will exhibit a smaller residual error than a bin predictingthe future state of a gesture that it does not represent. For simpledynamic gestures applications, a linear-with-offset-component model ispreferably used to discriminate between gestures. For more complexgestures, a variation of a velocity damping model is used.

In commonly assigned U.S. patent application Ser. No. 09/798,594, wedescribe a real-time object tracking system (ROTS) capable of trackingmoving objects in a scene. Unlike current search-and-locate algorithms,the subject algorithm uses a target location technique which does notinvolve search. The system, which is also applicable to the vehicularapplications according to the present invention, tracks objects based onthe color, motion and shape of the object in the image. The trackingalgorithm uses a unique color matching technique which uses minimalcomputation. This color matching function is used to compute threemeasures of the target's probable location based on the target color,shape and motion. It then computes the most probable location of thetarget using a weighting technique. These techniques make the inventionvery computationally efficient also makes it robust to noise, occlusionand rapid motion of the target.

The imaging hardware includes a color camera, a frame grabber, and acomputer for processing. The software includes low-level image grabbingsoftware and the tracking algorithm. Once the application is running, agraphical user interface displays the live image from the color cameraon the computer screen. The operator can then use the mouse to click onthe hand in the image to select a target for tracking. The system willthen keep track of the moving target in the scene in real-time.

A schematic of the system is shown in FIG. 1. The imaging hardwareincludes a color camera 102 and a digitizer. The sequence of images ofthe scene is then fed to a computer 104 which runs tracking softwareaccording to the invention. The tracking algorithm is independent of theimaging system hardware. The tracking system has a graphical userinterface (GUI) to initialize the target and show the tracking result onthe screen 106.

The GUI for the ROTS displays a live color image from the camera on thecomputer screen. The user can initialize the target manually orautomatically. Once initialized, the ROTS will then track the target inreal-time.

The flow chart of the tracking algorithm is shown in FIG. 2. The programcaptures live images from the camera and displays them on the screen. Itthen allows the user to select the target manually using the mouse orautomatically by moving the target to a predetermined position in thescene. At the point of initialization, the color, the shape and locationof the target are computed and stored. Once the target is initialized,we compute an estimate of the target location using target dynamics. Wethen compute the actual location using the color, shape and motioninformation with respect to a region centered at the estimated location.

The input to the ROTS is a sequence of color images, preferably in thestandard RGB24 format. Hence, the hardware can be a camera with a imagegrabbing board or a USB camera connected to the USB port of thecomputer. A preferred GUI is shown in FIG. 3.

Tracking Using Color, Shape and Motion

Once the user clicks on the target in the image, we compute the mediancolor of a small region around this point in the image. This will be thecolor of the target region being tracked in the scene until it isreinitialized. We also store the shape of the target by segmenting theobject using its color. Once tracking begins, we compute the center ofthe target region in the image using a combination of three aspects ofthe target. The three aspects are the color, the shape and the motion.This results in a very robust tracking system which can withstand avariety of noise, occlusion and rapid motion.

Color Matching

The color of a pixel in a color image is determined by the values of theRed, Green and Blue bytes corresponding to the pixel in the imagebuffer. This color value will form a point in the three-dimensional RGBcolor space. When we compute the color of the target, we assume that thetarget is fairly evenly colored and the illumination stays relativelythe same. The color of the target is then the median RGB value of asample set of pixels constituting the target. When the target moves andthe illumination changes the color of the target is likely to change. Weuse a computationally efficient color matching function which allows usto compute whether a pixel color matches the target color within limits.

When the illumination on the target changes, the intensity of the colorwill change. This will appear as a movement along the RGB color vectoras shown in FIG. 5. In order to account for slight variations in thecolor, we further allow the point in color space to lie within asmall-truncated cone as shown in FIG. 5. The two thresholds will decidethe shape of the matching color cone. A threshold on the angle of thecolor cone and another threshold on the minimum length of the colorvector decides the matching color space. Thus, any pixel whose colorlies within the truncated cone in color space will be considered ashaving the same color as the target.

Given a colored pixel, we quantitatively define the match between it anda reference color pixel as follows. Let (R, G, B) be the values of theRGB vector of the first pixel. Let (R_(r), G_(r), B_(r)) be the RGBvector for the reference color. d = RR_(r) + GG_(r) + BB_(r)m_(r) = R_(r)² + G_(r)² + B_(r)² m = R² + G² + B²$d_{m} = \frac{d}{m_{r}}$ $d_{a} = \frac{d}{\sqrt{m_{r}m}}$${{ColorMatch}\quad\left( {R,G,B} \right)} = \left\{ \begin{matrix}{d_{m}d_{a}} & {{if}\quad\left( {{\left( {d_{m}^{l} < d_{m} < d_{m}^{h}} \right)\quad\&}\quad\left( {d_{a}^{l} < d_{a} < d_{a}^{h}} \right)} \right)} \\0 & {otherwise}\end{matrix} \right.$

The value of d_(m) is related to the length of the projection of thegiven color vector onto the reference vector. The value of d_(a) isrelated to the angle between the two vectors. If we set two thresholdbands for d_(m) and d_(a), we can filter out those pixels which liewithin the truncated cone around the reference vector. Their productwill indicate the goodness of the match. The parameters d_(m) and d_(a)are chosen to be computationally simple to implement which becomesimportant when all the pixels in a region have to be compared to thereference color in each new image.

Position Using Color

Once we have the target color and a color matching algorithm, we canfind all the pixels in any given region of the image which match thetarget color. We use the quantitative measure of the match to find aweighted average of these pixel positions. This gives us the most likelycenter of the target based on color alone. If (i, j) are the row andcolumn coordinates of the pixel P_(c)(i,j), then for a given rectangularregion the most likely target center based on color alone will be givenas follows.P_(c)(i, j, t) = ColorMatch  (R(i, j, t), G(i, j, t), B(i, j, t))${Center}_{color} = {\begin{bmatrix}r_{c} \\c_{c}\end{bmatrix} = \begin{bmatrix}\frac{\sum\limits_{1}^{I*J}{{P_{c}\left( {i,j,t} \right)}*i}}{\sum\limits_{1}^{I*J}{P_{c}\left( {i,j,t} \right)}} \\\frac{\sum\limits_{1}^{I*J}{{P_{c}\left( {i,j,t} \right)}*j}}{\sum\limits_{1}^{I*J}{P_{c}\left( {i,j,t} \right)}}\end{bmatrix}}$Note that the centroid of the target is computed as a weighted sum. Theweights are the color matching measure of the pixel. This weighting ofthe pixel contrasts with the usual practice of weighting all matchingpixels the same makes our algorithm less prone to creep. We also keeptrack of the sum of the matched pixel weights. If this sum is less thana threshold we assume that the target is not in the region.Shape Matching

Once the target is initialized, we compute a two-dimensional template ofthe target. We use this dynamic template which is updated every frame tomeasure the closeness of pixels at the estimated location to the targetshape. Given the color of the object being tracked and the colormatching function we segment all the pixels in a region around theestimated location. The resulting segmented image is the shape of theobject and forms the template. With each new image of the scene, thetemplate of the target in the previous frame is used to compute the newcenter of the target in the new image. The advantage of using templatesinstead of any assumed shape such as an ellipse is that the tracking andlocalization of the target is much more robust to shape change and hencemore accurate.P(i, j, t) = ColorMatch  (R(i, j, t), G(i, j, t), B(i, j, t))  for  time = t${M\left( {i,j,{t - 1}} \right)} = \left\{ {{\begin{matrix}1 & {{if}\quad\left( {{P\left( {i,j,{t - 1}} \right)} > 0} \right)} \\0 & {otherwise}\end{matrix}{S\left( {i,j,t} \right)}} = {{{P\left( {i,j,t} \right)}{M\left( {i,j,{t - 1}} \right)}{Center}_{shape}} = {\begin{bmatrix}r_{s} \\c_{s}\end{bmatrix} = \begin{bmatrix}\frac{\sum\limits_{1}^{I*J}{{S\left( {i,j,t} \right)}*i}}{\sum\limits_{1}^{I*J}{S\left( {i,j,t} \right)}} \\\frac{\sum\limits_{1}^{I*J}{{S\left( {i,j,t} \right)}*j}}{\sum\limits_{1}^{I*J}{S\left( {i,j,t} \right)}}\end{bmatrix}}}} \right.$The closeness of the shape is a summation of the product of the pixelcolor match P(i, j) with the target template M(i, j). Note again thatthe color matching measure is used to weight the shape measure. Thismakes our algorithm robust to creep. Once the region S is obtained, wecan compute the centroid of S. This is the probable location of thetarget based solely on the shape of the target.Motion Detection

The algorithm checks for motion in a region near the estimated targetposition using a motion detecting function. This function computes thedifference between the current image and the previous image, which isstored in memory. If motion has occurred, there will be sufficientchange in the intensities in the region. The motion detection functionwill trigger if a sufficient number of pixels change intensity by acertain threshold value. This detection phase eliminates unnecessarycomputation when the object is stationary.

Position Using Motion

If the motion detection function detects motion, the next step is tolocate the target. This is done using the difference image and thetarget color. When an object moves between frames in a relativelystationary background, the color of the pixels changes between framesnear the target (unless the target and the background are of the samecolor). We compute the color change between frames for pixels near thetarget location. The pixels whose color changes beyond a threshold makeup the difference image. Note that the difference image will have areas,which are complementary. The pixels where the object used to be willcomplement those pixels where the object is at now. If we separate thesepixels using the color of the target, we can compute the new location ofthe target. The set of pixels in the difference image, which has thecolor of the target in the new image, will correspond to the leadingedge of the target in the new image. If we assume that the shape of thetarget changes negligibly between frames, we can use the shape of thetarget from the previous image to compute the position of the center ofthe target from this difference image.

Let D be the difference sub-image between the previous target and theestimated target location in the new image. If we threshold thedifference image, we end up with a binary image. If we intersect thisbinary image D with the shape of the target in the new image M we getthe moving edge of the target as the region V. We then weight thisregion by the color matching measure P.${D\left( {i,j,t} \right)} = \left\{ {{\begin{matrix}1 & {{{if}\quad{{{P\left( {i,j,t} \right)} - {P\left( {i,j,{t - 1}} \right)}}}} > \tau_{m}} \\0 & {otherwise}\end{matrix}{M\left( {i,j,t} \right)}} = \left\{ {{\begin{matrix}1 & {{if}\quad\left( {{P\left( {i,j,t} \right)} > \tau_{c}} \right)} \\0 & {otherwise}\end{matrix}{V\left( {i,j,t} \right)}} = {{\left( {{D\left( {i,j,t} \right)}\bigcap{M\left( {i,j,t} \right)}} \right)*{P\left( {i,j,t} \right)}{Center}_{motion}} = {\begin{bmatrix}r_{m} \\c_{m}\end{bmatrix} = \begin{bmatrix}\frac{\sum\limits_{1}^{I*J}{{V\left( {i,j,t} \right)}*i}}{\sum\limits_{1}^{I*J}{V\left( {i,j,t} \right)}} \\\frac{\sum\limits_{1}^{I*J}{{V\left( {i,j,t} \right)}*j}}{\sum\limits_{1}^{I*J}{V\left( {i,j,t} \right)}}\end{bmatrix}}}} \right.} \right.$The centroid of the region V is then computed as the probable locationof the target based on motion alone. This weighting of the intersectionregion by the color matching measure makes our tracking less prone tojitter.

In a physically implemented system, processing a large image may slowdown the program. Fortunately, the nature of the tracking task is suchthat, only a fraction of the image is of interest. This region calledthe window of interest lies around the estimated position of the targetin the new image. We can compute the location of the target in the newimage from the location of the target in the previous image and itsdynamics. We have used prediction based on velocity computation betweenframes. This technique is able to keep track of the target even when thetarget moves rapidly. We have found that the window of interest istypically one one-hundredth the area of the original image. This speedsup the computation of the new target location considerably.

Tracking Algorithm

If we are given an estimated target location as (rc, cc) in the newimage and the size of the area to be searched is given by (rs, cs), thenthe algorithm can be written in pseudo code as shown in FIG. 6.

Note that the color matching weight c is being used to weight all thethree centers. This weighting makes this algorithm smoother and morerobust. The velocity computed at the end of the tracking algorithm isused to compute the estimated position of the target in the next frame.

Extensions of the system are possible in accordance with the describedalgorithm herein. One is a tracking system which can track multipletargets in the same image. Another uses the tracking in two stereoimages to track the target in 3D.

Vehicular Applications

Using the technology described above, various implementations areapplicable to the vehicular environment, as depicted in FIG. 7. Oneembodiment, for example, allows an operator or passenger to controlcomfort or entertainment features such the heater, air conditioner,lights, mirror positions or the radio/CD player using hand gestures. Analternative would allow for the automatic adjustment of car seatingrestraints based on head position. Yet another embodiment would be usedto determine when to fire an airbag (and at what velocity ororientation) based on the position of a person in a vehicle seat.

As discussed above, a generic interactive system of this type wouldinclude the following components (described in detail above):

-   -   1. One or more cameras (or other sensing system) to view the        driver or passenger;    -   2. A tracking system for tracking the position, velocity or        acceleration of person's head, body, or other body parts;    -   3. A gesture/behavior recognition system for recognizing and        identifying the person's motions; and    -   4. Algorithms for controlling devices in the vehicle, whether        under active or passive control by the vehicle occupant.

In terms of the sensing system cameras could be mounted anywhere withinthe vehicle having a suitable view of the person. Other types of sensingsystems could alternatively be used. Tracking may be carried out fromone or multiple systems, and would preferably return a position in twoor three-dimensional space. The gesture/behavior recognition systemdescribed above and in the referenced applications would preferably beused to convert the tracked motions into gestures and behaviors. Thesebehaviors would be identified as controls for active or passive systemslocated in the vehicle. The system would then use the position andgesture information to control various vehicle features, such as theradio, seat position, air-bag deployment, on-board map systems, etc.

ADDITIONAL EMBODIMENTS

The invention may also be used to control systems outside of thevehicle. The on-board sensor system would be used to track the driver orpassenger, but when the algorithms produce a command for a desiredresponse, that response (or just position and gesture information) couldbe transmitted via various methods (wireless, light, whatever) to othersystems outside the vehicle to control devices located outside thevehicle. For example, this would allow a person to use gestures insidethe car to interact with a kiosk located outside of the car.

1. A method of controlling one or more vehicular-related devices,comprising the steps of: sensing the position or motion of a driver orpassenger of a vehicle; and controlling a device associated with theoperation, safety or comfort of the vehicle in accordance with thesensed position or motion.
 2. The method of claim 1, wherein the motionincludes a hand or body gesture.
 3. The method of claim 1, wherein thedevice is associated with entertainment.
 4. The method of claim 1,including the adjustment of car seating restraints based on headposition.
 5. The method of claim 1, including the deployment of anairbag based on the position, velocity or acceleration of a person in avehicle seat.
 6. The method of claim 5, further including the control ofthe velocity or orientation of the airbag based upon body position,velocity or acceleration.
 7. The method of claim 1, further includingthe control of a device external to the vehicle.
 8. A system forcontrolling one or more vehicular-related devices, comprising: a devicefor sensing the position or motion of the head, body, or other bodyparts of a driver or passenger of a vehicle; a tracking system fortracking the head, body, or other body parts; a gesture/behaviorrecognition system for recognizing and identifying the person's motions;and a controller for controlling devices associated with the vehicle,whether under active or passive control by the vehicle occupant.
 9. Thesystem of claim 8, wherein the device for sensing is a video camera. 10.The system of claim 8, wherein the device is associated withentertainment.
 11. The system of claim 8, including the adjustment ofcar seating restraints based on head position.
 12. The system of claim8, including the deployment of an airbag based on the position, velocityor acceleration of a person in a vehicle seat.
 13. The system of claim12, further including the control of the velocity or orientation of theairbag based upon body position, velocity or acceleration.
 14. Thesystem of claim 8, further including the control of a device external tothe vehicle.